/* 验证方法 */

export const valiDate = (that, form) => {
  return new Promise((resolve, reject) => {
    try {
      that.$refs[form].validate(valid => {
        if (valid) {
          resolve(valid)
        }
      })
    } catch (e) {
      reject(e)
    }
  })
}
